import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
      vue(),
    ],
  server: {
    port: 9090,
  },
  base: "./",
  resolve: {
    alias: {
      "@": path.resolve(__dirname,"src"),
      "com": path.resolve(__dirname,"src/components"),
      "api": path.resolve(__dirname,"src/api"),
      "views": path.resolve(__dirname,"src/views"),
      "utils": path.resolve(__dirname,"src/utils"),
      "router": path.resolve(__dirname,"src/router"),
    },
    // 忽略后缀名的配置选项, 添加 .vue 选项时要记得原本默认忽略的选项也要手动写入
    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
  },

})
